﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FastMapper.Core;
using FluentAssertions;
using NUnit.Framework;

namespace FastMapper.UnitTests.Internals
{
    [TestFixture]
    public class TypeInfoTests
    {
        public class ClassTestBase
        {
            public string PropertyOne { get; set; }
            public int PorpertyTwo { get; private set; }
 
        }

        public class ClassTest : ClassTestBase
        {
            public DateTime PropertyThree { get; set; }
        }

        private TypeInfo TypeInfo { get; set; }
        private PropertyInfo _propertyOne;
        private PropertyInfo _propertyTwo;
        private PropertyInfo _propertyThree;

        [TestFixtureSetUp]
        public void Init()
        {
            TypeInfo = new TypeInfo(typeof(ClassTest));
        }

        [Test]
        public void PropertiesInfo_are_Correctly_Generated()
        {
            _propertyOne.HasSetter.Should().BeTrue();
            _propertyTwo.HasSetter.Should().BeFalse();
            _propertyThree.HasSetter.Should().BeTrue();

        }

    }
}
